package com.cj;

/**
 * @Auther: chenjie
 * @Date: 2021/7/14 - 07 - 14 - 22:48
 * @Description: com.cj
 */
public class Person implements Cloneable {
    private String name;
    private int age;

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public String toString() {
        return super.toString()+"Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public static void main(String[] args) throws CloneNotSupportedException {
        Person person = new Person("cc",10);
            Person person2 = (Person) person.clone();

        System.out.println(person);
        System.out.println(person2);
    }
}
